namespace Cos.Core.NHibernate.Tests.Values
{
    using System.Collections.Generic;

    using FluentNHibernate.Utils;

    public class ReferenceList<T, TListElement> : Cos.Core.NHibernate.Tests.Values.List<T, TListElement>
    {
        public ReferenceList(Accessor property, IEnumerable<TListElement> value)
            : base(property, value)
        {}

        public override void HasRegistered(Tests.PersistenceSpecification<T> specification)
        {
            foreach (TListElement item in Expected)
            {
                specification.TransactionalSave(item);
            }
        }
    }
}